using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;

public class HoverTip : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
{
    private CanvasGroup tip;

    // Start is called before the first frame update
    void Start()
    {
        tip = GetComponentInChildren<CanvasGroup>();
        tip.alpha = 0f;
    }

    public void OnPointerEnter(PointerEventData eventData)
    {
        tip.alpha = 1f;
    }

    public void OnPointerExit(PointerEventData eventData)
    {
        tip.alpha = 0f;
    } 
}
